//
//  CompanyJobPostedViewController.m
//  Btpin
//
//  Created by Vic on 2019/4/2.
//  Copyright © 2019 Vic. All rights reserved.
//

#import "CompanyJobPostedViewController.h"
#import "CompanyCreatInfoCell.h"
#import "MineInfoEditViewController.h"
#import "SelcetCityViewController.h"
#import "MineInfoEditViewController.h"
#import "PMineResumeSelfDescriptionViewController.h"
#import "QRCodeViewController.h"
#import "SelectJobCategoryViewController.h"

#import "PSWageRangePickerView.h"
#import "CompanyJobPromoteConfigModel.h"
#import "PMineWalletViewController.h"

@interface CompanyJobPostedViewController ()<UITableViewDelegate, UITableViewDataSource, PSSingleRowViewDelegate, MineInfoEditViewControllerDelegate, SelcetCityViewControllerDelegate, PMineResumeSelfDescriptionViewControllerDelegate, SelectJobCategoryViewControllerDelegate, PSWageRangePickerViewDelegate, UITextFieldDelegate>
{
    NSMutableArray *dataArray;
    
    UITableView *jobTableView;
    UIButton *okBtn;
    
//    UIButton *yesForShangBtn;
//    UIButton *noForShangBtn;
//    UIView *shangBgView;
//    UILabel *titleForShangLbl;
    UILabel *titleLbl;
    UIImageView *lieIconImgView;
    UIButton *yesForLieBtn;
    UIButton *noForLieBtn;
    UIView *serviceView;
    UIImageView *dujiaIconImgView;
    UIImageView *feidujiaIconImgView;
//    UITextField *chujiaTextField;
//    UITextField *yusuanTextField;
    BOOL dujiaSelectFlag;
    
    NSMutableArray *wageDataArray;
    
    NSString *minwage;
    NSString *maxwage;
    
    CompanyJobPromoteConfigModel *configModel;
}
@property (nonatomic, strong) PSSingleRowView *jobsNaturePickerView;
@property (nonatomic, strong) PSSingleRowView *jobCatsPickerView;
@property (nonatomic, strong) PSSingleRowView *educationPickerView;
@property (nonatomic, strong) PSSingleRowView *experiencePickerView;
@property (nonatomic, strong) PSWageRangePickerView *wageRangePickerView;
@end

@implementation CompanyJobPostedViewController

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    if (self.jobsNaturePickerView) {
        self.jobsNaturePickerView.hidden = YES;
    }
    if (self.jobCatsPickerView) {
        self.jobCatsPickerView.hidden = YES;
    }
    if (self.educationPickerView) {
        self.educationPickerView.hidden = YES;
    }
    if (self.experiencePickerView) {
        self.experiencePickerView.hidden = YES;
    }
    if (self.wageRangePickerView) {
        self.wageRangePickerView.hidden = YES;
    }
}
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"填写职位信息";
    
    minwage = @"";
    maxwage = @"";
    dujiaSelectFlag = YES;
    
    [self loadDataInfo];
    [self loadDataLocation];
    [self loadDataForPromoteConfig];
    //    [self initUI];
}
- (void)loadDataForPromoteConfig {
    SVPHUDShow;
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:0];
    dic = [UIToolsControl getPublicParameter];
    [BaseNetManager requestWithMethod:POST path:Company_JobPromoteConfig_URL params:dic successBlock:^(NSDictionary *responseObject) {
        if ([responseObject[@"code"] integerValue] == 2000) {
            id data = responseObject[@"data"];
            if ([data isKindOfClass:[NSDictionary class]]) {
                self->configModel = [[CompanyJobPromoteConfigModel alloc] init];
                [self->configModel setValuesForKeysWithDictionary:data];
            }
            SVPHUDDismiss;
        } else {
            SVPHUDError(responseObject[@"msg"]);
        }
        [self initUI];
    } failurBlock:^(NSError *error) {
        SVPHUDError(NetErrorAlertText);
    }];
}
- (void)okBtnTap {
    for (NSInteger i = 0; i < dataArray.count; i++) {
        PublicCategoryElementModel *model = dataArray[i];
        if (model.detail && model.detail.length) {
        } else {
            switch (i) {
                case 0: {
                    SVPHUDError(CompanyAlertText);
                } break;
                case 1: {
                    SVPHUDError(CompanyJobsNatureAlertText);
                } break;
                case 2: {
                    SVPHUDError(CompanyJobCatsAlertText);
                } break;
                case 3: {
                    SVPHUDError(CompanyJobDescriptionAlertText);
                } break;
                case 4: {
                    SVPHUDError(CompanyWageAlertText);
                } break;
                case 5: {
                    SVPHUDError(EducationAlertText);
                } break;
                case 6: {
                    SVPHUDError(CompanyExperienceAlertText);
                } break;
                case 7: {
                    SVPHUDError(CompanyJobAddressAlertText);
                } break;
                default:
                    break;
            }
            return;
        }
    }
    [self updateInfo];
}
- (void)updateInfo {
    SVPHUDShow;
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:0];
    dic = [UIToolsControl getPublicParameter];
    PublicCategoryElementModel *model10 = dataArray[0];
    [dic setObject:model10.detail forKey:@"title"];
    PublicCategoryElementModel *model11 = dataArray[1];
    [dic setObject:model11.id forKey:@"nature"];
    PublicCategoryElementModel *model12 = dataArray[2];
    [dic setObject:model12.id forKey:@"category"];
    PublicCategoryElementModel *model13 = dataArray[3];
    [dic setObject:model13.detail forKey:@"contents"];
    //    PublicCategoryElementModel *model14 = dataArray[4];
    [dic setObject:minwage forKey:@"minwage"];
    [dic setObject:maxwage forKey:@"maxwage"];
    PublicCategoryElementModel *model15 = dataArray[5];
    [dic setObject:model15.id forKey:@"education"];
    PublicCategoryElementModel *model16 = dataArray[6];
    [dic setObject:model16.id forKey:@"experience"];
    PublicCategoryElementModel *model17 = dataArray[7];
    [dic setObject:model17.id forKey:@"district"];
    [dic setObject:@"0" forKey:@"sex"];
    [dic setObject:@"0" forKey:@"age"];
    [dic setObject:@"" forKey:@"department"];
    [dic setObject:((yesForLieBtn.selected)?((dujiaSelectFlag)?@"1":@"2"):@"0") forKey:@"headhunter"];
    [dic setObject:@"1" forKey:@"amount"];
    [dic setObject:@"" forKey:@"deadline"];
    [dic setObject:@"" forKey:@"share_promote"];
    [dic setObject:@"" forKey:@"share_promote_price"];
    [dic setObject:@"" forKey:@"share_promote_amount"];
    
    [BaseNetManager requestWithMethod:POST path:Company_JobCreate_URL params:dic successBlock:^(NSDictionary * _Nonnull responseObject) {
        if ([responseObject[@"code"] integerValue] == 2000) {
            SVPHUDSuccess(responseObject[@"msg"]);
            
            self.add(YES);
            [self performSelector:@selector(delayClick) withObject:nil afterDelay:0.5];
        } else {
            SVPHUDError(responseObject[@"msg"]);
        }
    } failurBlock:^(NSError * _Nonnull error) {
        SVPHUDError(NetErrorAlertText);
    }];
}
- (void)delayClick {
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)loadDataInfo {
    [self loadDataForWage];
    
    self.jobsNaturePickerView = [[PSSingleRowView alloc] initWithData:[DataToolsControl sharedManager].allCategoryInfoModel.jobsNatureArray target:self];
    self.jobsNaturePickerView.hidden = YES;
    self.jobCatsPickerView = [[PSSingleRowView alloc] initWithData:[DataToolsControl sharedManager].allCategoryInfoModel.jobCatsArray target:self];
    self.jobCatsPickerView.hidden = YES;
    self.wageRangePickerView = [[PSWageRangePickerView alloc] initWithDataArray:wageDataArray target:self];
    self.wageRangePickerView.hidden = YES;
    
    NSMutableArray *eduArr = [NSMutableArray arrayWithCapacity:0];
    PublicCategoryElementModel *eduModel = [[PublicCategoryElementModel alloc] init];
    eduModel.id = @"0";
    eduModel.name = @"不限";
    [eduArr addObject:eduModel];
    for (PublicCategoryElementModel *tempModel in [DataToolsControl sharedManager].allCategoryInfoModel.educationArray) {
        [eduArr addObject:tempModel];
    }
    self.educationPickerView = [[PSSingleRowView alloc] initWithData:eduArr target:self];
    self.educationPickerView.hidden = YES;
    NSMutableArray *expArr = [NSMutableArray arrayWithCapacity:0];
    PublicCategoryElementModel *expModel = [[PublicCategoryElementModel alloc] init];
    expModel.id = @"0";
    expModel.name = @"不限";
    [expArr addObject:expModel];
    for (PublicCategoryElementModel *tempModel in [DataToolsControl sharedManager].allCategoryInfoModel.experienceArray) {
        [expArr addObject:tempModel];
    }
    self.experiencePickerView = [[PSSingleRowView alloc] initWithData:expArr target:self];
    self.experiencePickerView.hidden = YES;
}
- (void)editBtnTap {
    QRCodeViewController *QRCVC = [[QRCodeViewController alloc] init];
    QRCVC.pushVCType = VCPushTypeOfPostJob;
    QRCVC.edit = ^(BOOL editFlag) {
        if (editFlag) {
            self.add(YES);
            [self performSelector:@selector(delayClick) withObject:nil afterDelay:0.5];
        }
    };
    QRCVC.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:QRCVC animated:YES];
}
- (void)initUI {
    jobTableView = [UIToolsControl initTableViewWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT-HeightOfStatusBarAndNavigationBar-SIMEmojKeyBoardkBottomNOSafeArea_Height-65*Scale) target:self style:UITableViewStyleGrouped];
    jobTableView.rowHeight = 45*Scale;
    jobTableView.sectionHeaderHeight = 0.1;
    jobTableView.tableFooterView = [[UIView alloc] init];
    jobTableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);
    [self.view addSubview:jobTableView];
    
    UIButton *editBtn = [UIToolsControl initButtonWithFrame:CGRectMake(15*Scale, EndY(jobTableView)+10*Scale, 130*Scale, 46*Scale) imageName:nil target:self action:@selector(editBtnTap) title:@"电脑编辑" titleColor:THEMECOLOR_OF_ORANGE];
    editBtn.layer.cornerRadius = 23*Scale;
    editBtn.layer.masksToBounds = YES;
    editBtn.layer.borderColor = THEMECOLOR_OF_ORANGE.CGColor;
    editBtn.layer.borderWidth = lineH;
    editBtn.titleLabel.font = Font(Font_17);
    [self.view addSubview:editBtn];
    
    okBtn = [UIToolsControl initButtonWithFrame:CGRectMake(EndX(editBtn)+15*Scale, EndY(jobTableView)+10*Scale, WIDTH-175*Scale, 46*Scale) imageName:nil target:self action:@selector(okBtnTap) title:@"立即发布" titleColor:COLOR_OF_WHITE];
    okBtn.layer.cornerRadius = 23*Scale;
    okBtn.layer.masksToBounds = YES;
    okBtn.backgroundColor = THEMECOLOR_OF_ORANGE;
    okBtn.titleLabel.font = Font(Font_17);
    [self.view addSubview:okBtn];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return dataArray.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    CompanyCreatInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:isCellID];
    if (!cell) {
        cell = [[CompanyCreatInfoCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:isCellID];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    
    PublicCategoryElementModel *model = dataArray[indexPath.row];
    [cell reloadDataModel:model];
    
    return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    switch (indexPath.row) {
        case 0: { // 职位名称
            [self pushInfoEditVC:InfoEditTypeOfPosition];
        } break;
        case 1: { // 职位性质
            self.jobsNaturePickerView.hidden = NO;
        } break;
        case 2: { // 职位类别
            [self jumpToSelectPosition];
        } break;
        case 3: { // 职位描述
            PMineResumeSelfDescriptionViewController *PMRSDVC = [[PMineResumeSelfDescriptionViewController alloc] init];
            PMRSDVC.limitTextMaxNumber = 1000;
            PMRSDVC.titleStr = @"职位描述";
            PMRSDVC.delegate = self;
            PublicCategoryElementModel *tempModel = dataArray[3];
            if (tempModel.detail.length) {
                PMRSDVC.context = tempModel.detail;
            }
            [self.navigationController pushViewController:PMRSDVC animated:YES];
        } break;
        case 4: { // 薪资待遇
            self.wageRangePickerView.hidden = NO;
        } break;
        case 5: { // 学历要求
            self.educationPickerView.hidden = NO;
        } break;
        case 6: { // 经验要求
            self.experiencePickerView.hidden = NO;
        } break;
        case 7: { // 工作地区
            SelcetCityViewController *SCVC = [[SelcetCityViewController alloc] init];
            SCVC.delegate = self;
            [self.navigationController pushViewController:SCVC animated:YES];
        } break;
        default:
            break;
    }
}
- (void)pMineResumeSelfDescriptionViewControllerBack:(NSString *)info {
    PublicCategoryElementModel *tempModel = dataArray[3];
    tempModel.detail = info;
    [dataArray replaceObjectAtIndex:3 withObject:tempModel];
    [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:3 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
}
- (void)pushInfoEditVC:(InfoEditType)type {
    MineInfoEditViewController *MIEVC = [[MineInfoEditViewController alloc] init];
    MIEVC.type = type;
    MIEVC.delegate = self;
    PublicCategoryElementModel *tempModel = dataArray[0];
    if (tempModel.detail.length) {
        MIEVC.text = tempModel.detail;
    }
    [self.navigationController pushViewController:MIEVC animated:YES];
}
- (void)mineInfoEditViewController:(NSString *)info type:(InfoEditType)type {
    switch (type) {
        case InfoEditTypeOfPosition: {
            PublicCategoryElementModel *tempModel = dataArray[0];
            tempModel.detail = info;
            [dataArray replaceObjectAtIndex:0 withObject:tempModel];
            [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:0 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
        } break;
        default:
            break;
    }
}
- (void)selcetCityViewControllerInfo:(NSDictionary *)dic {
    PublicCategoryElementModel *tempModel = dataArray[7];
    
    if ([[NSString stringWithFormat:@"%@", dic[@"cityid"]] integerValue] == 0) {
        tempModel.id = [NSString stringWithFormat:@"%@", dic[@"provinceid"]];
        tempModel.detail = [NSString stringWithFormat:@"%@", dic[@"province"]];
    } else {
        tempModel.id = [NSString stringWithFormat:@"%@", dic[@"cityid"]];
        tempModel.detail = [NSString stringWithFormat:@"%@-%@", dic[@"province"], dic[@"city"]];
    }
    
    [dataArray replaceObjectAtIndex:7 withObject:tempModel];
    [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:7 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    return [UIToolsControl initViewWithFrame:CGRectMake(0, 0, WIDTH, 0.1) backgroundColor:COLOR_OF_CLEAR];
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 0.1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    return 260*Scale;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
    UIView *bgView = [UIToolsControl initViewWithFrame:CGRectMake(0, 0, WIDTH, 260*Scale) backgroundColor:COLOR_OF_WHITE];
    bgView.userInteractionEnabled = YES;
    for (UIView *v in bgView.subviews) {
        [v removeFromSuperview];
    }
    
    UIView *lineView = [UIToolsControl initViewWithFrame:CGRectMake(0, 0, WIDTH, 10*Scale) backgroundColor:THEMECOLOR_OF_GRAY];
    [bgView addSubview:lineView];
    
    
    titleLbl = [UIToolsControl initLabelWithFrame:CGRectMake(0, EndY(lineView), WIDTH, 35*Scale) text:@"         是否开启猎头服务？" textColor:THEMECOLOR_OF_ORANGE font:Font_15];
    titleLbl.backgroundColor = COLOR_OF_WHITE;
    titleLbl.userInteractionEnabled = YES;
    [bgView addSubview:titleLbl];
    lieIconImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(ScalePS(15), EndY(lineView)+ScalePS(10), ScalePS(15), ScalePS(15)) imageName:@"companyjob_lie_icon"];
    [bgView addSubview:lieIconImgView];
    
    yesForLieBtn = [UIToolsControl initButtonWithFrame:CGRectMake(185*Scale, EndY(lineView)+5*Scale, 40*Scale, 25*Scale) imageName:nil target:self action:@selector(yesBtnTap) title:@"是" titleColor:THEMECOLOR_OF_TEXT_666666];
    yesForLieBtn.backgroundColor = COLOR_OF_WHITE;
    yesForLieBtn.titleLabel.font = Font(Font_15);
    yesForLieBtn.layer.cornerRadius = 2;
    yesForLieBtn.layer.masksToBounds = YES;
    yesForLieBtn.layer.borderWidth = lineH;
    yesForLieBtn.layer.borderColor = THEMECOLOR_OF_TEXT_666666.CGColor;
    [bgView addSubview:yesForLieBtn];
    
    noForLieBtn = [UIToolsControl initButtonWithFrame:CGRectMake(EndX(yesForLieBtn)+20*Scale, EndY(lineView)+5*Scale, 40*Scale, 25*Scale) imageName:nil target:self action:@selector(noBtnTap) title:@"否" titleColor:COLOR_OF_WHITE];
    noForLieBtn.backgroundColor = THEMECOLOR_OF_ORANGE;
    noForLieBtn.titleLabel.font = Font(Font_15);
    noForLieBtn.layer.cornerRadius = 2;
    noForLieBtn.layer.masksToBounds = YES;
    noForLieBtn.layer.borderWidth = lineH;
    noForLieBtn.layer.borderColor = THEMECOLOR_OF_ORANGE.CGColor;
    [bgView addSubview:noForLieBtn];
    
    serviceView = [UIToolsControl initViewWithFrame:CGRectMake(0, EndY(titleLbl), WIDTH, 85*Scale) backgroundColor:THEMECOLOR_OF_GRAY];
    [bgView addSubview:serviceView];
    serviceView.hidden = YES;
    dujiaIconImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(20*Scale, 15*Scale, 20*Scale, 20*Scale) imageName:@"privacysetting_main_s"];
    [serviceView addSubview:dujiaIconImgView];
    UILabel *oneLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(dujiaIconImgView)+15*Scale, 8*Scale, WIDTH-100*Scale, 34*Scale) text:@"独家，收费标准年薪15%" textColor:THEMECOLOR_OF_TEXT_666666 font:Font_14];
    [serviceView addSubview:oneLbl];
    UIButton *oneBtn = [UIToolsControl initButtonWithFrame:CGRectMake(0, 0, WIDTH, 42.5*Scale) imageName:nil target:self action:@selector(oneBtnTap) title:nil titleColor:nil];
    [serviceView addSubview:oneBtn];
    feidujiaIconImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(20*Scale, EndY(dujiaIconImgView)+15*Scale, 20*Scale, 20*Scale) imageName:@"privacysetting_main_n"];
    [serviceView addSubview:feidujiaIconImgView];
    UILabel *moreLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(dujiaIconImgView)+15*Scale, EndY(oneLbl), WIDTH-100*Scale, 34*Scale) text:@"非独家，收费标准年薪20%" textColor:THEMECOLOR_OF_TEXT_666666 font:Font_14];
    [serviceView addSubview:moreLbl];
    UIButton *moreBtn = [UIToolsControl initButtonWithFrame:CGRectMake(0, EndY(oneBtn), WIDTH, 42.5*Scale) imageName:nil target:self action:@selector(moreBtnTap) title:nil titleColor:nil];
    [serviceView addSubview:moreBtn];
    
    return bgView;
}
- (void)yesBtnTap {
    [okBtn setTitle:@"发布并提交猎头服务意向" forState:UIControlStateNormal];
    yesForLieBtn.selected = YES;
    serviceView.hidden = NO;
    yesForLieBtn.backgroundColor = THEMECOLOR_OF_ORANGE;
    yesForLieBtn.layer.borderColor = COLOR_OF_CLEAR.CGColor;
    [yesForLieBtn setTitleColor:COLOR_OF_WHITE forState:UIControlStateNormal];
    noForLieBtn.backgroundColor = COLOR_OF_WHITE;
    noForLieBtn.layer.borderColor = THEMECOLOR_OF_TEXT_666666.CGColor;
    [noForLieBtn setTitleColor:THEMECOLOR_OF_TEXT_666666 forState:UIControlStateNormal];
}
- (void)noBtnTap {
    [okBtn setTitle:@"立即发布" forState:UIControlStateNormal];
    yesForLieBtn.selected = NO;
    serviceView.hidden = YES;
    yesForLieBtn.backgroundColor = COLOR_OF_WHITE;
    yesForLieBtn.layer.borderColor = THEMECOLOR_OF_TEXT_666666.CGColor;
    [yesForLieBtn setTitleColor:THEMECOLOR_OF_TEXT_666666 forState:UIControlStateNormal];
    noForLieBtn.backgroundColor = THEMECOLOR_OF_ORANGE;
    noForLieBtn.layer.borderColor = THEMECOLOR_OF_ORANGE.CGColor;
    [noForLieBtn setTitleColor:COLOR_OF_WHITE forState:UIControlStateNormal];
}
- (void)oneBtnTap {
    dujiaSelectFlag = YES;
    dujiaIconImgView.image = [UIImage imageNamed:@"privacysetting_main_s"];
    feidujiaIconImgView.image = [UIImage imageNamed:@"privacysetting_main_n"];
}
- (void)moreBtnTap {
    dujiaSelectFlag = NO;
    dujiaIconImgView.image = [UIImage imageNamed:@"privacysetting_main_n"];
    feidujiaIconImgView.image = [UIImage imageNamed:@"privacysetting_main_s"];
}

- (void)psWageRangePickerViewCancle {
    self.wageRangePickerView.hidden = YES;
}
- (void)psWageRangePickerView:(PSWageRangePickerView *)psWageRangePickerView leftModel:(PSWageRangeModel *)leftModel rightModel:(PSWageRangeModel *)rightModel {
    psWageRangePickerView.hidden = YES;
    PublicCategoryElementModel *tempModel = dataArray[4];
    tempModel.detail = [NSString stringWithFormat:@"%@~%@", leftModel.showText, rightModel.showText];
    tempModel.id = @"";
    
    minwage = leftModel.dataText;
    maxwage = rightModel.dataText;
    [dataArray replaceObjectAtIndex:4 withObject:tempModel];
    [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:4 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
}
- (void)psSingleRowViewCancel:(PSSingleRowView *)psSingleRowView {
    psSingleRowView.hidden = YES;
}
- (void)psSingleRowViewOk:(PublicCategoryElementModel *)model PSSingleRowView:(PSSingleRowView *)psSingleRowView {
    psSingleRowView.hidden = YES;
    if (psSingleRowView == self.jobsNaturePickerView) {
        PublicCategoryElementModel *tempModel = dataArray[1];
        tempModel.detail = model.name;
        tempModel.id = model.id;
        [dataArray replaceObjectAtIndex:1 withObject:tempModel];
        [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:1 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
    } else if (psSingleRowView == self.jobCatsPickerView) {
        PublicCategoryElementModel *tempModel = dataArray[2];
        tempModel.detail = model.name;
        tempModel.id = model.id;
        [dataArray replaceObjectAtIndex:2 withObject:tempModel];
        [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:2 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
    } else if (psSingleRowView == self.educationPickerView) {
        PublicCategoryElementModel *tempModel = dataArray[5];
        tempModel.detail = model.name;
        tempModel.id = model.id;
        [dataArray replaceObjectAtIndex:5 withObject:tempModel];
        [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:5 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
    } else if (psSingleRowView == self.experiencePickerView) {
        PublicCategoryElementModel *tempModel = dataArray[6];
        tempModel.detail = model.name;
        tempModel.id = model.id;
        [dataArray replaceObjectAtIndex:6 withObject:tempModel];
        [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:6 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
    }
}

- (void)loadDataLocation {
    dataArray = [NSMutableArray arrayWithCapacity:0];
    PublicCategoryElementModel *model1 = [[PublicCategoryElementModel alloc] init];
    model1.name = @"职位名称";
    [dataArray addObject:model1];
    PublicCategoryElementModel *model2 = [[PublicCategoryElementModel alloc] init];
    model2.name = @"职位性质";
    [dataArray addObject:model2];
    PublicCategoryElementModel *model3 = [[PublicCategoryElementModel alloc] init];
    model3.name = @"职位类别";
    [dataArray addObject:model3];
    PublicCategoryElementModel *model4 = [[PublicCategoryElementModel alloc] init];
    model4.name = @"职位描述";
    [dataArray addObject:model4];
    PublicCategoryElementModel *model5 = [[PublicCategoryElementModel alloc] init];
    model5.name = @"职位待遇";
    [dataArray addObject:model5];
    PublicCategoryElementModel *model6 = [[PublicCategoryElementModel alloc] init];
    model6.name = @"学历要求";
    [dataArray addObject:model6];
    PublicCategoryElementModel *model7 = [[PublicCategoryElementModel alloc] init];
    model7.name = @"经验要求";
    [dataArray addObject:model7];
    PublicCategoryElementModel *model8 = [[PublicCategoryElementModel alloc] init];
    model8.name = @"工作地区";
    [dataArray addObject:model8];
}

- (void)jumpToSelectPosition {
    SelectJobCategoryViewController *SJCVC = [[SelectJobCategoryViewController alloc] init];
    SJCVC.navigationItem.title = @"职位";
    SJCVC.delegate = self;
    [self.navigationController pushViewController:SJCVC animated:YES];
}
- (void)selectJobCategoryViewControllerInfo:(SelectJobCategoryModel *)model {
    PublicCategoryElementModel *tempModel = dataArray[2];
    tempModel.detail = model.threeLevelName;
    tempModel.id = model.threeLevelID;
    [dataArray replaceObjectAtIndex:2 withObject:tempModel];
    [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:2 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
}
- (void)loadDataForWage {
    wageDataArray = [NSMutableArray arrayWithCapacity:0];
    
    NSArray *arr = [DataToolsControl wageRange];
    for (NSDictionary *dic in arr) {
        PSWageRangeModel *model = [[PSWageRangeModel alloc] init];
        [model setValuesForKeysWithDictionary:dic];
        [wageDataArray addObject:model];
    }
}
//- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
//    NSMutableString *multStr = [NSMutableString stringWithString:textField.text];
//    [multStr replaceCharactersInRange:range withString:string];
//
//    if ((textField == chujiaTextField) || (textField == yusuanTextField)) {
//        if (![UIToolsControl validateNumber:multStr]) {
//            SVPHUDError(@"请输入数字");
//            return NO;
//        }
//    }
//    return YES;
//}
- (void)chongzhiBtnTap {
    PMineWalletViewController *PMWVC = [[PMineWalletViewController alloc] init];
    PMWVC.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:PMWVC animated:YES];
}

@end







/*
#import "CompanyJobPostedViewController.h"
#import "CompanyCreatInfoCell.h"
#import "MineInfoEditViewController.h"
#import "SelcetCityViewController.h"
#import "MineInfoEditViewController.h"
#import "PMineResumeSelfDescriptionViewController.h"
#import "QRCodeViewController.h"
#import "SelectJobCategoryViewController.h"

#import "PSWageRangePickerView.h"
#import "CompanyJobPromoteConfigModel.h"
#import "PMineWalletViewController.h"

@interface CompanyJobPostedViewController ()<UITableViewDelegate, UITableViewDataSource, PSSingleRowViewDelegate, MineInfoEditViewControllerDelegate, SelcetCityViewControllerDelegate, PMineResumeSelfDescriptionViewControllerDelegate, SelectJobCategoryViewControllerDelegate, PSWageRangePickerViewDelegate, UITextFieldDelegate>
{
    NSMutableArray *dataArray;
    
    UITableView *jobTableView;
    UIButton *okBtn;
    
    UIButton *yesForShangBtn;
    UIButton *noForShangBtn;
    UIView *shangBgView;
    UILabel *titleForShangLbl;
    UILabel *titleLbl;
    UIImageView *lieIconImgView;
    UIButton *yesForLieBtn;
    UIButton *noForLieBtn;
    UIView *serviceView;
    UIImageView *dujiaIconImgView;
    UIImageView *feidujiaIconImgView;
    UITextField *chujiaTextField;
    UITextField *yusuanTextField;
    BOOL dujiaSelectFlag;
    
    NSMutableArray *wageDataArray;
    
    NSString *minwage;
    NSString *maxwage;
    
    CompanyJobPromoteConfigModel *configModel;
}
@property (nonatomic, strong) PSSingleRowView *jobsNaturePickerView;
@property (nonatomic, strong) PSSingleRowView *jobCatsPickerView;
@property (nonatomic, strong) PSSingleRowView *educationPickerView;
@property (nonatomic, strong) PSSingleRowView *experiencePickerView;
@property (nonatomic, strong) PSWageRangePickerView *wageRangePickerView;
@end

@implementation CompanyJobPostedViewController

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    if (self.jobsNaturePickerView) {
        self.jobsNaturePickerView.hidden = YES;
    }
    if (self.jobCatsPickerView) {
        self.jobCatsPickerView.hidden = YES;
    }
    if (self.educationPickerView) {
        self.educationPickerView.hidden = YES;
    }
    if (self.experiencePickerView) {
        self.experiencePickerView.hidden = YES;
    }
    if (self.wageRangePickerView) {
        self.wageRangePickerView.hidden = YES;
    }
}
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"填写职位信息";
    
    minwage = @"";
    maxwage = @"";
    dujiaSelectFlag = YES;
    
    [self loadDataInfo];
    [self loadDataLocation];
    [self loadDataForPromoteConfig];
//    [self initUI];
}
- (void)loadDataForPromoteConfig {
    SVPHUDShow;
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:0];
    dic = [UIToolsControl getPublicParameter];
    [BaseNetManager requestWithMethod:POST path:Company_JobPromoteConfig_URL params:dic successBlock:^(NSDictionary *responseObject) {
        if ([responseObject[@"code"] integerValue] == 2000) {
            id data = responseObject[@"data"];
            if ([data isKindOfClass:[NSDictionary class]]) {
                self->configModel = [[CompanyJobPromoteConfigModel alloc] init];
                [self->configModel setValuesForKeysWithDictionary:data];
            }
            SVPHUDDismiss;
        } else {
            SVPHUDError(responseObject[@"msg"]);
        }
        [self initUI];
    } failurBlock:^(NSError *error) {
        SVPHUDError(NetErrorAlertText);
    }];
}
- (void)okBtnTap {
    for (NSInteger i = 0; i < dataArray.count; i++) {
        PublicCategoryElementModel *model = dataArray[i];
        if (model.detail && model.detail.length) {
        } else {
            switch (i) {
                case 0: {
                    SVPHUDError(CompanyAlertText);
                } break;
                case 1: {
                    SVPHUDError(CompanyJobsNatureAlertText);
                } break;
                case 2: {
                    SVPHUDError(CompanyJobCatsAlertText);
                } break;
                case 3: {
                    SVPHUDError(CompanyJobDescriptionAlertText);
                } break;
                case 4: {
                    SVPHUDError(CompanyWageAlertText);
                } break;
                case 5: {
                    SVPHUDError(EducationAlertText);
                } break;
                case 6: {
                    SVPHUDError(CompanyExperienceAlertText);
                } break;
                case 7: {
                    SVPHUDError(CompanyJobAddressAlertText);
                } break;
                default:
                    break;
            }
            return;
        }
    }
    [self updateInfo];
}
- (void)updateInfo {
    if (yesForShangBtn.selected) {
        if ([yusuanTextField.text integerValue] > [configModel.coins integerValue]) {
            SVPHUDError(@"您的余额不足，请先充值");
            return;
        }
    }
    SVPHUDShow;
    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:0];
    dic = [UIToolsControl getPublicParameter];
    PublicCategoryElementModel *model10 = dataArray[0];
    [dic setObject:model10.detail forKey:@"title"];
    PublicCategoryElementModel *model11 = dataArray[1];
    [dic setObject:model11.id forKey:@"nature"];
    PublicCategoryElementModel *model12 = dataArray[2];
    [dic setObject:model12.id forKey:@"category"];
    PublicCategoryElementModel *model13 = dataArray[3];
    [dic setObject:model13.detail forKey:@"contents"];
//    PublicCategoryElementModel *model14 = dataArray[4];
    [dic setObject:minwage forKey:@"minwage"];
    [dic setObject:maxwage forKey:@"maxwage"];
    PublicCategoryElementModel *model15 = dataArray[5];
    [dic setObject:model15.id forKey:@"education"];
    PublicCategoryElementModel *model16 = dataArray[6];
    [dic setObject:model16.id forKey:@"experience"];
    PublicCategoryElementModel *model17 = dataArray[7];
    [dic setObject:model17.id forKey:@"district"];
    [dic setObject:@"0" forKey:@"sex"];
    [dic setObject:@"0" forKey:@"age"];
    [dic setObject:@"" forKey:@"department"];
    [dic setObject:((yesForLieBtn.selected)?((dujiaSelectFlag)?@"1":@"2"):@"0") forKey:@"headhunter"];
    [dic setObject:@"1" forKey:@"amount"];
    [dic setObject:@"" forKey:@"deadline"];
    [dic setObject:((yesForShangBtn.selected)?@"1":@"0") forKey:@"share_promote"];
    [dic setObject:chujiaTextField.text forKey:@"share_promote_price"];
    [dic setObject:yusuanTextField.text forKey:@"share_promote_amount"];
    
    [BaseNetManager requestWithMethod:POST path:Company_JobCreate_URL params:dic successBlock:^(NSDictionary * _Nonnull responseObject) {
        if ([responseObject[@"code"] integerValue] == 2000) {
            SVPHUDSuccess(responseObject[@"msg"]);
            
            self.add(YES);
            [self performSelector:@selector(delayClick) withObject:nil afterDelay:0.5];
        } else {
            SVPHUDError(responseObject[@"msg"]);
        }
    } failurBlock:^(NSError * _Nonnull error) {
        SVPHUDError(NetErrorAlertText);
    }];
}
- (void)delayClick {
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)loadDataInfo {
    [self loadDataForWage];
    
    self.jobsNaturePickerView = [[PSSingleRowView alloc] initWithData:[DataToolsControl sharedManager].allCategoryInfoModel.jobsNatureArray target:self];
    self.jobsNaturePickerView.hidden = YES;
    self.jobCatsPickerView = [[PSSingleRowView alloc] initWithData:[DataToolsControl sharedManager].allCategoryInfoModel.jobCatsArray target:self];
    self.jobCatsPickerView.hidden = YES;
    self.wageRangePickerView = [[PSWageRangePickerView alloc] initWithDataArray:wageDataArray target:self];
    self.wageRangePickerView.hidden = YES;
    
    NSMutableArray *eduArr = [NSMutableArray arrayWithCapacity:0];
    PublicCategoryElementModel *eduModel = [[PublicCategoryElementModel alloc] init];
    eduModel.id = @"0";
    eduModel.name = @"不限";
    [eduArr addObject:eduModel];
    for (PublicCategoryElementModel *tempModel in [DataToolsControl sharedManager].allCategoryInfoModel.educationArray) {
        [eduArr addObject:tempModel];
    }
    self.educationPickerView = [[PSSingleRowView alloc] initWithData:eduArr target:self];
    self.educationPickerView.hidden = YES;
    NSMutableArray *expArr = [NSMutableArray arrayWithCapacity:0];
    PublicCategoryElementModel *expModel = [[PublicCategoryElementModel alloc] init];
    expModel.id = @"0";
    expModel.name = @"不限";
    [expArr addObject:expModel];
    for (PublicCategoryElementModel *tempModel in [DataToolsControl sharedManager].allCategoryInfoModel.experienceArray) {
        [expArr addObject:tempModel];
    }
    self.experiencePickerView = [[PSSingleRowView alloc] initWithData:expArr target:self];
    self.experiencePickerView.hidden = YES;
}
- (void)editBtnTap {
    QRCodeViewController *QRCVC = [[QRCodeViewController alloc] init];
    QRCVC.pushVCType = VCPushTypeOfPostJob;
    QRCVC.edit = ^(BOOL editFlag) {
        if (editFlag) {
            self.add(YES);
            [self performSelector:@selector(delayClick) withObject:nil afterDelay:0.5];
        }
    };
    QRCVC.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:QRCVC animated:YES];
}
- (void)initUI {
    jobTableView = [UIToolsControl initTableViewWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT-HeightOfStatusBarAndNavigationBar-HeightOfTabBarSafeMargin-65*Scale) target:self style:UITableViewStyleGrouped];
    jobTableView.rowHeight = 45*Scale;
    jobTableView.sectionHeaderHeight = 0.1;
    jobTableView.tableFooterView = [[UIView alloc] init];
    jobTableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);
    [self.view addSubview:jobTableView];
    
    UIButton *editBtn = [UIToolsControl initButtonWithFrame:CGRectMake(15*Scale, EndY(jobTableView)+10*Scale, 130*Scale, 46*Scale) imageName:nil target:self action:@selector(editBtnTap) title:@"电脑编辑" titleColor:THEMECOLOR_OF_ORANGE];
    editBtn.layer.cornerRadius = 23*Scale;
    editBtn.layer.masksToBounds = YES;
    editBtn.layer.borderColor = THEMECOLOR_OF_ORANGE.CGColor;
    editBtn.layer.borderWidth = lineH;
    editBtn.titleLabel.font = Font(Font_17);
    [self.view addSubview:editBtn];
    
    okBtn = [UIToolsControl initButtonWithFrame:CGRectMake(EndX(editBtn)+15*Scale, EndY(jobTableView)+10*Scale, WIDTH-175*Scale, 46*Scale) imageName:nil target:self action:@selector(okBtnTap) title:@"立即发布" titleColor:COLOR_OF_WHITE];
    okBtn.layer.cornerRadius = 23*Scale;
    okBtn.layer.masksToBounds = YES;
    okBtn.backgroundColor = THEMECOLOR_OF_ORANGE;
    okBtn.titleLabel.font = Font(Font_17);
    [self.view addSubview:okBtn];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return dataArray.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    CompanyCreatInfoCell *cell = [tableView dequeueReusableCellWithIdentifier:isCellID];
    if (!cell) {
        cell = [[CompanyCreatInfoCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:isCellID];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    
    PublicCategoryElementModel *model = dataArray[indexPath.row];
    [cell reloadDataModel:model];
    
    return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    switch (indexPath.row) {
        case 0: { // 职位名称
            [self pushInfoEditVC:InfoEditTypeOfPosition];
        } break;
        case 1: { // 职位性质
            self.jobsNaturePickerView.hidden = NO;
        } break;
        case 2: { // 职位类别
            [self jumpToSelectPosition];
        } break;
        case 3: { // 职位描述
            PMineResumeSelfDescriptionViewController *PMRSDVC = [[PMineResumeSelfDescriptionViewController alloc] init];
            PMRSDVC.limitTextMaxNumber = 1000;
            PMRSDVC.titleStr = @"职位描述";
            PMRSDVC.delegate = self;
            PublicCategoryElementModel *tempModel = dataArray[3];
            if (tempModel.detail.length) {
                PMRSDVC.context = tempModel.detail;
            }
            [self.navigationController pushViewController:PMRSDVC animated:YES];
        } break;
        case 4: { // 薪资待遇
            self.wageRangePickerView.hidden = NO;
        } break;
        case 5: { // 学历要求
            self.educationPickerView.hidden = NO;
        } break;
        case 6: { // 经验要求
            self.experiencePickerView.hidden = NO;
        } break;
        case 7: { // 工作地区
            SelcetCityViewController *SCVC = [[SelcetCityViewController alloc] init];
            SCVC.delegate = self;
            [self.navigationController pushViewController:SCVC animated:YES];
        } break;
        default:
            break;
    }
}
- (void)pMineResumeSelfDescriptionViewControllerBack:(NSString *)info {
    PublicCategoryElementModel *tempModel = dataArray[3];
    tempModel.detail = info;
    [dataArray replaceObjectAtIndex:3 withObject:tempModel];
    [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:3 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
}
- (void)pushInfoEditVC:(InfoEditType)type {
    MineInfoEditViewController *MIEVC = [[MineInfoEditViewController alloc] init];
    MIEVC.type = type;
    MIEVC.delegate = self;
    PublicCategoryElementModel *tempModel = dataArray[0];
    if (tempModel.detail.length) {
        MIEVC.text = tempModel.detail;
    }
    [self.navigationController pushViewController:MIEVC animated:YES];
}
- (void)mineInfoEditViewController:(NSString *)info type:(InfoEditType)type {
    switch (type) {
        case InfoEditTypeOfPosition: {
            PublicCategoryElementModel *tempModel = dataArray[0];
            tempModel.detail = info;
            [dataArray replaceObjectAtIndex:0 withObject:tempModel];
            [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:0 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
        } break;
        default:
            break;
    }
}
- (void)selcetCityViewControllerInfo:(NSDictionary *)dic {
    PublicCategoryElementModel *tempModel = dataArray[7];
    
    if ([[NSString stringWithFormat:@"%@", dic[@"cityid"]] integerValue] == 0) {
        tempModel.id = [NSString stringWithFormat:@"%@", dic[@"provinceid"]];
        tempModel.detail = [NSString stringWithFormat:@"%@", dic[@"province"]];
    } else {
        tempModel.id = [NSString stringWithFormat:@"%@", dic[@"cityid"]];
        tempModel.detail = [NSString stringWithFormat:@"%@-%@", dic[@"province"], dic[@"city"]];
    }
    
    [dataArray replaceObjectAtIndex:7 withObject:tempModel];
    [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:7 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    return [UIToolsControl initViewWithFrame:CGRectMake(0, 0, WIDTH, 0.1) backgroundColor:COLOR_OF_CLEAR];
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 0.1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    return 260*Scale;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
    UIView *bgView = [UIToolsControl initViewWithFrame:CGRectMake(0, 0, WIDTH, 260*Scale) backgroundColor:COLOR_OF_WHITE];
    bgView.userInteractionEnabled = YES;
    for (UIView *v in bgView.subviews) {
        [v removeFromSuperview];
    }
    
    UIView *lineView = [UIToolsControl initViewWithFrame:CGRectMake(0, 0, WIDTH, 10*Scale) backgroundColor:THEMECOLOR_OF_GRAY];
    [bgView addSubview:lineView];
    
    titleForShangLbl = [UIToolsControl initLabelWithFrame:CGRectMake(0, EndY(lineView), WIDTH, 35*Scale) text:@"        是否发布职位悬赏？" textColor:THEMECOLOR_OF_ORANGE font:Font_15];
    titleForShangLbl.userInteractionEnabled = YES;
    titleForShangLbl.backgroundColor = COLOR_OF_WHITE;
    [titleForShangLbl borderColor:THEMECOLOR_OF_GRAY borderWidth:lineH borderType:BorderSideTypeBottom];
    [bgView addSubview:titleForShangLbl];
    UIImageView *shangIconImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(ScalePS(15), EndY(lineView)+ScalePS(11), ScalePS(12), ScalePS(12)) imageName:@"companyjob_shang_small_icon"];
    [bgView addSubview:shangIconImgView];
    
    yesForShangBtn = [UIToolsControl initButtonWithFrame:CGRectMake(185*Scale, 15*Scale, 40*Scale, 25*Scale) imageName:nil target:self action:@selector(yesForShangBtnTap) title:@"是" titleColor:THEMECOLOR_OF_TEXT_666666];
    yesForShangBtn.backgroundColor = COLOR_OF_WHITE;
    yesForShangBtn.titleLabel.font = Font(Font_15);
    yesForShangBtn.layer.cornerRadius = 2;
    yesForShangBtn.layer.masksToBounds = YES;
    yesForShangBtn.layer.borderWidth = lineH;
    yesForShangBtn.layer.borderColor = THEMECOLOR_OF_TEXT_666666.CGColor;
    [bgView addSubview:yesForShangBtn];
    
    noForShangBtn = [UIToolsControl initButtonWithFrame:CGRectMake(EndX(yesForShangBtn)+20*Scale, 15*Scale, 40*Scale, 25*Scale) imageName:nil target:self action:@selector(noForShangBtnTap) title:@"否" titleColor:COLOR_OF_WHITE];
    noForShangBtn.backgroundColor = THEMECOLOR_OF_RED;
    noForShangBtn.titleLabel.font = Font(Font_15);
    noForShangBtn.layer.cornerRadius = 2;
    noForShangBtn.layer.masksToBounds = YES;
    noForShangBtn.layer.borderWidth = lineH;
    noForShangBtn.layer.borderColor = THEMECOLOR_OF_ORANGE.CGColor;
    [bgView addSubview:noForShangBtn];
    
    shangBgView = [UIToolsControl initViewWithFrame:CGRectMake(0, EndY(titleForShangLbl), WIDTH, 85*Scale) backgroundColor:THEMECOLOR_OF_GRAY];
    [bgView addSubview:shangBgView];
    shangBgView.hidden = YES;
    
    UILabel *shangAlertUpLbl = [UIToolsControl initLabelWithFrame:CGRectMake(ScalePS(15), ScalePS(8), WIDTH-30, ScalePS(34)) text:@"职位将被转发推广，出价会影响效果" textColor:THEMECOLOR_OF_TEXT_666666 font:Font_12];
    shangAlertUpLbl.backgroundColor = COLOR_OF_CLEAR;
    shangAlertUpLbl.textAlignment = NSTextAlignmentRight;
    [shangBgView addSubview:shangAlertUpLbl];
    NSString *alertUp1 = @"职位将被转发推广，出价会影响效果";
    NSString *alertUp2 = @"职位将被转发推广，";
    NSMutableAttributedString *alertUpAtt = [[NSMutableAttributedString alloc] initWithString:alertUp1];
    [alertUpAtt addAttributes:@{NSFontAttributeName:Font(Font_12), NSForegroundColorAttributeName:THEMECOLOR_OF_ORANGE} range:NSMakeRange(0, alertUp1.length)];
    [alertUpAtt addAttributes:@{NSFontAttributeName:Font(Font_12), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_9a9a9a} range:NSMakeRange(0, alertUp2.length)];
    shangAlertUpLbl.attributedText = alertUpAtt;
    
    UILabel *shangAlertBottomLbl = [UIToolsControl initLabelWithFrame:CGRectMake(ScalePS(15), ScalePS(43), WIDTH-30, ScalePS(34)) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_12];
    shangAlertBottomLbl.backgroundColor = COLOR_OF_CLEAR;
    shangAlertBottomLbl.textAlignment = NSTextAlignmentRight;
    [shangBgView addSubview:shangAlertBottomLbl];
    NSString *alertBottom1 = configModel.coins;
    NSString *alertBottom2 = [NSString stringWithFormat:@"账户余额：%@ 聘豆", alertBottom1];
    NSString *alertBottom3 = [NSString stringWithFormat:@"%@ 去充值>", alertBottom2];
    NSMutableAttributedString *alertBottomAtt = [[NSMutableAttributedString alloc] initWithString:alertBottom3];
    [alertBottomAtt addAttributes:@{NSFontAttributeName:Font(Font_12), NSForegroundColorAttributeName:THEMECOLOR_OF_ORANGE} range:NSMakeRange(0, alertBottom3.length)];
    [alertBottomAtt addAttributes:@{NSFontAttributeName:Font(Font_12), NSForegroundColorAttributeName:THEMECOLOR_OF_TEXT_9a9a9a} range:NSMakeRange(0, alertBottom2.length)];
    [alertBottomAtt addAttributes:@{NSFontAttributeName:Font(Font_12), NSForegroundColorAttributeName:THEMECOLOR_OF_RED} range:NSMakeRange(5, alertBottom1.length)];
    shangAlertBottomLbl.attributedText = alertBottomAtt;
    
    UIButton *chongzhiBtn = [UIToolsControl initButtonWithFrame:CGRectMake(WIDTH*0.5, 0, WIDTH*0.5, ViewHeight(shangBgView)) imageName:nil target:self action:@selector(chongzhiBtnTap) title:nil titleColor:nil];
    [shangBgView addSubview:chongzhiBtn];
    
    
    UILabel *shangOutLbl1 = [UIToolsControl initLabelWithFrame:CGRectMake(ScalePS(15), ScalePS(8), ([UIToolsControl textWidth:@"出价：" size:CGSizeMake(MAXFLOAT, ScalePS(34)) font:Font_14]+1), ScalePS(34)) text:@"出价：" textColor:THEMECOLOR_OF_TEXT_666666 font:Font_14];
    shangOutLbl1.backgroundColor = COLOR_OF_CLEAR;
    [shangBgView addSubview:shangOutLbl1];
//    configModel.suggestPrice
    
    chujiaTextField = [UIToolsControl initTextFieldWithFrame:CGRectMake(EndX(shangOutLbl1), StartY(shangOutLbl1)-5, ScalePS(50), ViewHeight(shangOutLbl1)) placeholder:@"请输入" secureTextEntry:NO font:Font_15 padding:YES];
    chujiaTextField.delegate = self;
    chujiaTextField.text = configModel.suggestPrice;
    chujiaTextField.keyboardType = UIKeyboardTypePhonePad;
    [shangBgView addSubview:chujiaTextField];
    [chujiaTextField borderColor:THEMECOLOR_OF_TEXT_cccccc borderWidth:lineH borderType:BorderSideTypeBottom];
    chujiaTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentBottom;
    
    UILabel *shangOutLbl2 = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(chujiaTextField)+ScalePS(10), ScalePS(8), ([UIToolsControl textWidth:@"聘豆/次" size:CGSizeMake(MAXFLOAT, ScalePS(34)) font:Font_14]+1), ScalePS(34)) text:@"聘豆/次" textColor:THEMECOLOR_OF_TEXT_666666 font:Font_14];
    shangOutLbl2.backgroundColor = COLOR_OF_CLEAR;
    [shangBgView addSubview:shangOutLbl2];
    
    UILabel *shangYusuanLbl1 = [UIToolsControl initLabelWithFrame:CGRectMake(ScalePS(15), EndY(shangOutLbl1), ([UIToolsControl textWidth:@"预算：" size:CGSizeMake(MAXFLOAT, ScalePS(34)) font:Font_14]+1), ScalePS(34)) text:@"预算：" textColor:THEMECOLOR_OF_TEXT_666666 font:Font_14];
    shangYusuanLbl1.backgroundColor = COLOR_OF_CLEAR;
    [shangBgView addSubview:shangYusuanLbl1];
//    configModel.minPrice
    
    yusuanTextField = [UIToolsControl initTextFieldWithFrame:CGRectMake(EndX(shangYusuanLbl1), StartY(shangYusuanLbl1)-5, ScalePS(50), ViewHeight(shangYusuanLbl1)) placeholder:@"请输入" secureTextEntry:NO font:Font_15 padding:YES];
    yusuanTextField.delegate = self;
    yusuanTextField.keyboardType = UIKeyboardTypePhonePad;
    yusuanTextField.text = [UIToolsControl decimalNumberArithmetic:DecimalNumberArithmeticByMultiplyingBy value1:configModel.suggestPrice value2:configModel.minTimes];
    [shangBgView addSubview:yusuanTextField];
    [yusuanTextField borderColor:THEMECOLOR_OF_TEXT_cccccc borderWidth:lineH borderType:BorderSideTypeBottom];
    yusuanTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentBottom;
    
    UILabel *shangYusuanLbl2 = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(yusuanTextField)+ScalePS(10), EndY(shangOutLbl1), ([UIToolsControl textWidth:@"聘豆" size:CGSizeMake(MAXFLOAT, ScalePS(34)) font:Font_14]+1), ScalePS(34)) text:@"聘豆" textColor:THEMECOLOR_OF_TEXT_666666 font:Font_14];
    shangYusuanLbl2.backgroundColor = COLOR_OF_CLEAR;
    [shangBgView addSubview:shangYusuanLbl2];
    
    titleLbl = [UIToolsControl initLabelWithFrame:CGRectMake(0, EndY(titleForShangLbl), WIDTH, 35*Scale) text:@"        是否开启猎头服务？" textColor:THEMECOLOR_OF_ORANGE font:Font_15];
    titleLbl.backgroundColor = COLOR_OF_WHITE;
    titleLbl.userInteractionEnabled = YES;
    [bgView addSubview:titleLbl];
    lieIconImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(ScalePS(15), EndY(lineView)+ScalePS(10), ScalePS(15), ScalePS(15)) imageName:@"companyjob_lie_icon"];
    [bgView addSubview:lieIconImgView];
    
    yesForLieBtn = [UIToolsControl initButtonWithFrame:CGRectMake(185*Scale, EndY(titleForShangLbl)+5*Scale, 40*Scale, 25*Scale) imageName:nil target:self action:@selector(yesBtnTap) title:@"是" titleColor:THEMECOLOR_OF_TEXT_666666];
    yesForLieBtn.backgroundColor = COLOR_OF_WHITE;
    yesForLieBtn.titleLabel.font = Font(Font_15);
    yesForLieBtn.layer.cornerRadius = 2;
    yesForLieBtn.layer.masksToBounds = YES;
    yesForLieBtn.layer.borderWidth = lineH;
    yesForLieBtn.layer.borderColor = THEMECOLOR_OF_TEXT_666666.CGColor;
    [bgView addSubview:yesForLieBtn];
    
    noForLieBtn = [UIToolsControl initButtonWithFrame:CGRectMake(EndX(yesForLieBtn)+20*Scale, EndY(titleForShangLbl)+5*Scale, 40*Scale, 25*Scale) imageName:nil target:self action:@selector(noBtnTap) title:@"否" titleColor:COLOR_OF_WHITE];
    noForLieBtn.backgroundColor = THEMECOLOR_OF_ORANGE;
    noForLieBtn.titleLabel.font = Font(Font_15);
    noForLieBtn.layer.cornerRadius = 2;
    noForLieBtn.layer.masksToBounds = YES;
    noForLieBtn.layer.borderWidth = lineH;
    noForLieBtn.layer.borderColor = THEMECOLOR_OF_ORANGE.CGColor;
    [bgView addSubview:noForLieBtn];
    
    serviceView = [UIToolsControl initViewWithFrame:CGRectMake(0, EndY(titleLbl), WIDTH, 85*Scale) backgroundColor:THEMECOLOR_OF_GRAY];
    [bgView addSubview:serviceView];
    serviceView.hidden = YES;
    dujiaIconImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(20*Scale, 15*Scale, 20*Scale, 20*Scale) imageName:@"privacysetting_main_s"];
    [serviceView addSubview:dujiaIconImgView];
    UILabel *oneLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(dujiaIconImgView)+15*Scale, 8*Scale, WIDTH-100*Scale, 34*Scale) text:@"独家，收费标准年薪15%" textColor:THEMECOLOR_OF_TEXT_666666 font:Font_14];
    [serviceView addSubview:oneLbl];
    UIButton *oneBtn = [UIToolsControl initButtonWithFrame:CGRectMake(0, 0, WIDTH, 42.5*Scale) imageName:nil target:self action:@selector(oneBtnTap) title:nil titleColor:nil];
    [serviceView addSubview:oneBtn];
    feidujiaIconImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(20*Scale, EndY(dujiaIconImgView)+15*Scale, 20*Scale, 20*Scale) imageName:@"privacysetting_main_n"];
    [serviceView addSubview:feidujiaIconImgView];
    UILabel *moreLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(dujiaIconImgView)+15*Scale, EndY(oneLbl), WIDTH-100*Scale, 34*Scale) text:@"非独家，收费标准年薪20%" textColor:THEMECOLOR_OF_TEXT_666666 font:Font_14];
    [serviceView addSubview:moreLbl];
    UIButton *moreBtn = [UIToolsControl initButtonWithFrame:CGRectMake(0, EndY(oneBtn), WIDTH, 42.5*Scale) imageName:nil target:self action:@selector(moreBtnTap) title:nil titleColor:nil];
    [serviceView addSubview:moreBtn];
    
    return bgView;
}
- (void)yesForShangBtnTap {
    shangBgView.hidden = NO;
    titleLbl.frame = CGRectMake(0, EndY(shangBgView), WIDTH, 35*Scale);
    lieIconImgView.frame = CGRectMake(ScalePS(15), EndY(shangBgView)+ScalePS(11), ScalePS(12), ScalePS(12));
    yesForLieBtn.frame = CGRectMake(185*Scale, EndY(shangBgView)+5*Scale, 40*Scale, 25*Scale);
    noForLieBtn.frame = CGRectMake(EndX(yesForLieBtn)+20*Scale, EndY(shangBgView)+5*Scale, 40*Scale, 25*Scale);
    serviceView.frame = CGRectMake(0, EndY(titleLbl), WIDTH, 85*Scale);
    
    
    yesForShangBtn.selected = YES;
    yesForShangBtn.backgroundColor = THEMECOLOR_OF_RED;
    yesForShangBtn.layer.borderColor = COLOR_OF_CLEAR.CGColor;
    [yesForShangBtn setTitleColor:COLOR_OF_WHITE forState:UIControlStateNormal];
    noForShangBtn.backgroundColor = COLOR_OF_WHITE;
    noForShangBtn.layer.borderColor = THEMECOLOR_OF_TEXT_666666.CGColor;
    [noForShangBtn setTitleColor:THEMECOLOR_OF_TEXT_666666 forState:UIControlStateNormal];
}
- (void)noForShangBtnTap {
    shangBgView.hidden = YES;
    titleLbl.frame = CGRectMake(0, EndY(titleForShangLbl), WIDTH, 35*Scale);
    lieIconImgView.frame = CGRectMake(ScalePS(15), EndY(titleForShangLbl)+ScalePS(11), ScalePS(12), ScalePS(12));
    yesForLieBtn.frame = CGRectMake(185*Scale, EndY(titleForShangLbl)+5*Scale, 40*Scale, 25*Scale);
    noForLieBtn.frame = CGRectMake(EndX(yesForLieBtn)+20*Scale, EndY(titleForShangLbl)+5*Scale, 40*Scale, 25*Scale);
    serviceView.frame = CGRectMake(0, EndY(titleLbl), WIDTH, 85*Scale);
    
    yesForShangBtn.selected = NO;
    yesForShangBtn.backgroundColor = COLOR_OF_WHITE;
    yesForShangBtn.layer.borderColor = THEMECOLOR_OF_TEXT_666666.CGColor;
    [yesForShangBtn setTitleColor:THEMECOLOR_OF_TEXT_666666 forState:UIControlStateNormal];
    noForShangBtn.backgroundColor = THEMECOLOR_OF_RED;
    noForShangBtn.layer.borderColor = THEMECOLOR_OF_RED.CGColor;
    [noForShangBtn setTitleColor:COLOR_OF_WHITE forState:UIControlStateNormal];
}
- (void)yesBtnTap {
    [okBtn setTitle:@"发布并提交猎头服务意向" forState:UIControlStateNormal];
    yesForLieBtn.selected = YES;
    serviceView.hidden = NO;
    yesForLieBtn.backgroundColor = THEMECOLOR_OF_ORANGE;
    yesForLieBtn.layer.borderColor = COLOR_OF_CLEAR.CGColor;
    [yesForLieBtn setTitleColor:COLOR_OF_WHITE forState:UIControlStateNormal];
    noForLieBtn.backgroundColor = COLOR_OF_WHITE;
    noForLieBtn.layer.borderColor = THEMECOLOR_OF_TEXT_666666.CGColor;
    [noForLieBtn setTitleColor:THEMECOLOR_OF_TEXT_666666 forState:UIControlStateNormal];
}
- (void)noBtnTap {
    [okBtn setTitle:@"立即发布" forState:UIControlStateNormal];
    yesForLieBtn.selected = NO;
    serviceView.hidden = YES;
    yesForLieBtn.backgroundColor = COLOR_OF_WHITE;
    yesForLieBtn.layer.borderColor = THEMECOLOR_OF_TEXT_666666.CGColor;
    [yesForLieBtn setTitleColor:THEMECOLOR_OF_TEXT_666666 forState:UIControlStateNormal];
    noForLieBtn.backgroundColor = THEMECOLOR_OF_ORANGE;
    noForLieBtn.layer.borderColor = THEMECOLOR_OF_ORANGE.CGColor;
    [noForLieBtn setTitleColor:COLOR_OF_WHITE forState:UIControlStateNormal];
}
- (void)oneBtnTap {
    dujiaSelectFlag = YES;
    dujiaIconImgView.image = [UIImage imageNamed:@"privacysetting_main_s"];
    feidujiaIconImgView.image = [UIImage imageNamed:@"privacysetting_main_n"];
}
- (void)moreBtnTap {
    dujiaSelectFlag = NO;
    dujiaIconImgView.image = [UIImage imageNamed:@"privacysetting_main_n"];
    feidujiaIconImgView.image = [UIImage imageNamed:@"privacysetting_main_s"];
}

- (void)psWageRangePickerViewCancle {
    self.wageRangePickerView.hidden = YES;
}
- (void)psWageRangePickerView:(PSWageRangePickerView *)psWageRangePickerView leftModel:(PSWageRangeModel *)leftModel rightModel:(PSWageRangeModel *)rightModel {
    psWageRangePickerView.hidden = YES;
    PublicCategoryElementModel *tempModel = dataArray[4];
    tempModel.detail = [NSString stringWithFormat:@"%@~%@", leftModel.showText, rightModel.showText];
    tempModel.id = @"";
    
    minwage = leftModel.dataText;
    maxwage = rightModel.dataText;
    [dataArray replaceObjectAtIndex:4 withObject:tempModel];
    [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:4 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
}
- (void)psSingleRowViewCancel:(PSSingleRowView *)psSingleRowView {
    psSingleRowView.hidden = YES;
}
- (void)psSingleRowViewOk:(PublicCategoryElementModel *)model PSSingleRowView:(PSSingleRowView *)psSingleRowView {
    psSingleRowView.hidden = YES;
    if (psSingleRowView == self.jobsNaturePickerView) {
        PublicCategoryElementModel *tempModel = dataArray[1];
        tempModel.detail = model.name;
        tempModel.id = model.id;
        [dataArray replaceObjectAtIndex:1 withObject:tempModel];
        [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:1 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
    } else if (psSingleRowView == self.jobCatsPickerView) {
        PublicCategoryElementModel *tempModel = dataArray[2];
        tempModel.detail = model.name;
        tempModel.id = model.id;
        [dataArray replaceObjectAtIndex:2 withObject:tempModel];
        [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:2 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
    } else if (psSingleRowView == self.educationPickerView) {
        PublicCategoryElementModel *tempModel = dataArray[5];
        tempModel.detail = model.name;
        tempModel.id = model.id;
        [dataArray replaceObjectAtIndex:5 withObject:tempModel];
        [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:5 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
    } else if (psSingleRowView == self.experiencePickerView) {
        PublicCategoryElementModel *tempModel = dataArray[6];
        tempModel.detail = model.name;
        tempModel.id = model.id;
        [dataArray replaceObjectAtIndex:6 withObject:tempModel];
        [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:6 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
    }
}

- (void)loadDataLocation {
    dataArray = [NSMutableArray arrayWithCapacity:0];
    PublicCategoryElementModel *model1 = [[PublicCategoryElementModel alloc] init];
    model1.name = @"职位名称";
    [dataArray addObject:model1];
    PublicCategoryElementModel *model2 = [[PublicCategoryElementModel alloc] init];
    model2.name = @"职位性质";
    [dataArray addObject:model2];
    PublicCategoryElementModel *model3 = [[PublicCategoryElementModel alloc] init];
    model3.name = @"职位类别";
    [dataArray addObject:model3];
    PublicCategoryElementModel *model4 = [[PublicCategoryElementModel alloc] init];
    model4.name = @"职位描述";
    [dataArray addObject:model4];
    PublicCategoryElementModel *model5 = [[PublicCategoryElementModel alloc] init];
    model5.name = @"职位待遇";
    [dataArray addObject:model5];
    PublicCategoryElementModel *model6 = [[PublicCategoryElementModel alloc] init];
    model6.name = @"学历要求";
    [dataArray addObject:model6];
    PublicCategoryElementModel *model7 = [[PublicCategoryElementModel alloc] init];
    model7.name = @"经验要求";
    [dataArray addObject:model7];
    PublicCategoryElementModel *model8 = [[PublicCategoryElementModel alloc] init];
    model8.name = @"工作地区";
    [dataArray addObject:model8];
}

- (void)jumpToSelectPosition {
    SelectJobCategoryViewController *SJCVC = [[SelectJobCategoryViewController alloc] init];
    SJCVC.navigationItem.title = @"职位";
    SJCVC.delegate = self;
    [self.navigationController pushViewController:SJCVC animated:YES];
}
- (void)selectJobCategoryViewControllerInfo:(SelectJobCategoryModel *)model {
    PublicCategoryElementModel *tempModel = dataArray[2];
    tempModel.detail = model.threeLevelName;
    tempModel.id = model.threeLevelID;
    [dataArray replaceObjectAtIndex:2 withObject:tempModel];
    [jobTableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:[NSIndexPath indexPathForRow:2 inSection:0], nil] withRowAnimation:UITableViewRowAnimationNone];
}
- (void)loadDataForWage {
    wageDataArray = [NSMutableArray arrayWithCapacity:0];
    
    NSArray *arr = [DataToolsControl wageRange];
    for (NSDictionary *dic in arr) {
        PSWageRangeModel *model = [[PSWageRangeModel alloc] init];
        [model setValuesForKeysWithDictionary:dic];
        [wageDataArray addObject:model];
    }
}
- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
    if ((textField == chujiaTextField) || (textField == yusuanTextField)) {
        if (![UIToolsControl validatePositiveInteger:textField.text]) {
            SVPHUDError(@"请输入数字");
            return NO;
        }
        if (textField == chujiaTextField) {
            if ([textField.text integerValue] < [configModel.minPrice integerValue]) {
                chujiaTextField.text = configModel.minPrice;
                
                yusuanTextField.text = [NSString stringWithFormat:@"%@", [UIToolsControl decimalNumberArithmetic:DecimalNumberArithmeticByMultiplyingBy value1:configModel.minPrice value2:configModel.minTimes]];
            }
        }
    }
    return YES;
}
//- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
//    NSMutableString *multStr = [NSMutableString stringWithString:textField.text];
//    [multStr replaceCharactersInRange:range withString:string];
//
//    if ((textField == chujiaTextField) || (textField == yusuanTextField)) {
//        if (![UIToolsControl validateNumber:multStr]) {
//            SVPHUDError(@"请输入数字");
//            return NO;
//        }
//    }
//    return YES;
//}
- (void)chongzhiBtnTap {
    PMineWalletViewController *PMWVC = [[PMineWalletViewController alloc] init];
    PMWVC.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:PMWVC animated:YES];
}

@end
*/
